package com.example.skillcinema.adapters

import androidx.recyclerview.widget.DiffUtil
import com.example.skillcinema.db.displaymodels.FilmDisplayModel

class DiffUtilCallback : DiffUtil.ItemCallback<FilmDisplayModel>() {
    override fun areItemsTheSame(
        oldItem: FilmDisplayModel,
        newItem: FilmDisplayModel
    ): Boolean = oldItem.id == newItem.id

    override fun areContentsTheSame(
        oldItem: FilmDisplayModel,
        newItem: FilmDisplayModel
    ): Boolean = oldItem == newItem
}